<template>
   <div class="container" >
    <button class="btn" @click="send">send</button>
   </div>
</template>
<script>
   export default {
     name: '',
     data: function(){
       return {
       }
     },
     methods:{
        send(){
            var url ="/api/user/login";
            $.ajax({
                type: 'post',
                async: false,
                dataType : 'json',
                url: url,
                data: [
                    {name:"userName",value:"admin"},
                    {name:"passWord",value:"123456"}
                ],
                success: function (data) {
                    alert(JSON.stringify(data))
                },
                error: function(msg){
                    console.error(msg);
                }
            });

        }
     }
   }
</script>
<style>
  html,
  body, 
  #app{
    height: 100%;
  }
</style>
<style scoped>
   .container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      background-color: aliceblue;
   }
   .tr{
      width: 200px;
      flex-basis: 50px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      background-color: beige;
      align-items: center;
    }
   .second{
      background-color: aqua;
   }
</style>